class DataAssociations < ActiveRecord::Migration
  def self.up
  	# Vidage préalable de la table
  	down
  	# Insertion des données dans la table
    Association.create (:picture_id => '1',:album_id => '1')
    Association.create (:picture_id => '2',:album_id => '1') 
    Association.create (:picture_id => '3',:album_id => '1') 
    Association.create (:picture_id => '4',:album_id => '1') 
    Association.create (:picture_id => '5',:album_id => '1') 
    Association.create (:picture_id => '6',:album_id => '2') 
    Association.create (:picture_id => '7',:album_id => '2') 
    Association.create (:picture_id => '8',:album_id => '2') 
    Association.create (:picture_id => '9',:album_id => '2') 
    Association.create (:picture_id => '10',:album_id => '2') 
    Association.create (:picture_id => '11',:album_id => '2') 
    Association.create (:picture_id => '12',:album_id => '2')
    Association.create (:picture_id => '13',:album_id => '3') 
    Association.create (:picture_id => '14',:album_id => '3') 
    Association.create (:picture_id => '15',:album_id => '3') 
    Association.create (:picture_id => '16',:album_id => '3') 
    Association.create (:picture_id => '17',:album_id => '3')
    Association.create (:picture_id => '18',:album_id => '3')
    Association.create (:picture_id => '19',:album_id => '4') 
    Association.create (:picture_id => '20',:album_id => '4') 
    Association.create (:picture_id => '21',:album_id => '4') 
    Association.create (:picture_id => '22',:album_id => '4') 
    Association.create (:picture_id => '23',:album_id => '4') 
  end

  def self.down
  	# Vide la table
    Association.delete_all 
  end
end
